<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-search" method="post" action="{:U('Exams/users')}">
		<input type="hidden" name="exam_id" value="{$exam_id}">
			部门： 
			<select name="term_id" style="width: 120px;">
				<option value='0'>全部</option>
			</select> &nbsp;&nbsp;
			姓名：
			<input type="text" name="keyword" style="width: 200px;" value="{$keyword}" placeholder="请输入题干">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Exams/index')}">清空</a>
		</form>
		<form class="js-ajax-form" action="{:U('Exams/listorders')}" method="post">
			<table class="table table-hover table-bordered table-list" id="menus-table">
				<thead>
					<tr>
						<th width="50">用户ID</th>
						<th>报名/考试状态</th>
						<th>用户名</th>
						<th>姓名</th>
						<th>报名时间</th>
						<th>开始答题时间</th>
						<th>交卷时间</th>
						<th>答题情况</th>
						<th>考试得分</th>
					</tr>
				</thead>
				<tbody>
				<foreach name="users_list" item="vo">
				<tr>
					<td>{$vo['user_id']}</td>
					<td>{:sp_exam_user_state($vo['start_time'],$vo['end_time'])}</td>
					<td>{$vo['user_login']}</td>
					<td>{$vo['user_nicename']}</td>
					<td>{:date('Y-m-d H:i',strtotime($vo['signin_time']))}</td>
					<td>
					<empty name="vo['start_time']">-
					<else />
					{:date('Y-m-d H:i',strtotime($vo['start_time']))}
					</empty>
					</td>
					<td>
					<empty name="vo['end_time']">-
					<else />
					{:date('Y-m-d H:i',strtotime($vo['end_time']))}
					</empty>
					</td>
					<td>1/100</td>
					<td>{$vo.score}</td>
				</tr>
				</foreach>
				</tbody>
			</table>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>
	<script>
		function showSignin(url){		
			layer.open({
			      type: 2,
			      title: '报告及考试情况查看',
			      shadeClose: true,
			      shade: false,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['893px', '870px'],
			      content: url,
			      success:function(layero, index){
			    	  layer.full(index);
			      }
			});
		}
		function showFinish(url){
			showSignin(url);
		}
		
		$(document).ready(function() {
			Wind.css('treeTable');
			Wind.use('treeTable', function() {
				$("#menus-table").treeTable({
					indent : 20
				});
			});
		});

		setInterval(function() {
			var refersh_time = getCookie('refersh_time_admin_menu_index');
			if (refersh_time == 1) {
				reloadPage(window);
			}
		}, 1000);
		setCookie('refersh_time_admin_menu_index', 0);
	</script>
</body>
</html>